Skip to content

[docs] 4D attention masks#46507

Merged
stevhliu merged 2 commits into
huggingface:mainfrom
stevhliu:4d-attn
Jun 10, 2026
Merged

[docs] 4D attention masks#46507
stevhliu merged 2 commits into
huggingface:mainfrom
stevhliu:4d-attn

Conversation

@stevhliu

@stevhliu stevhliu commented Jun 8, 2026

Copy link
Copy Markdown
Member

fixes #46458 by adding docs for how to create and pass a custom 4D attention mask

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@stevhliu stevhliu requested a review from vasqu June 8, 2026 19:39

@vasqu vasqu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 important thing to correct re when float/bool is ok but the rest is very neat, thanks!

Comment thread docs/source/en/attention_interface.md Outdated
Comment thread docs/source/en/attention_interface.md Outdated
Comment thread docs/source/en/attention_interface.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

CI Dashboard: View test results in Grafana

@stevhliu stevhliu added this pull request to the merge queue Jun 10, 2026
Merged via the queue into huggingface:main with commit 33b7e4f Jun 10, 2026
32 checks passed
@stevhliu stevhliu deleted the 4d-attn branch June 10, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: Give a warning for 4D attention mask which use float dtype but in 0.0 and 1.0 term (instead of -inf and zero).

3 participants